package com.hy.kl.internet.user;

import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

//@EnableCircuitBreaker //开启断路器功能
//@EnableDiscoveryClient //开启服务发现客户端，
//@SpringBootApplication
//////@SpringCloudApplication //可以取代上面三个

//通过@EnableDiscoveryClient向服务中心注册
@SpringCloudApplication
public class KlInternetUserApplication {

    public static void main(String[] args) {
        SpringApplication.run(KlInternetUserApplication.class, args);
    }

    @Bean
    @LoadBalanced
    RestTemplate restTemplate() {
        return new RestTemplate();
    }
}
